<template>
  <div class="flex align-items-center m-y-10">
    <log-icon icon-name="log-good" class="shrink-0" />
    <div>
      <router-link
        :to="`/users/${item.modifier.id}`"
        class="title link hover-underline"
        target="_blank"
      >{{ item.modifier.nickname }}</router-link>
      <template v-if="state">
        将问题被标记为
        <el-tag type="danger" size="mini">精华</el-tag>
      </template>
      <template v-else>
        取消了问题加精
      </template>
      <timeago2 :date-time="item.created_at" pre-text=" - " class="info-deep" />
    </div>
  </div>
</template>

<script>
import LogIcon from './log-icon';

export default {
  name: 'change-essence-item',
  components: { LogIcon },
  props: {
    item: Object,
  },
  computed: {
    state() { return this.item.mod.newVal; },
  },
};
</script>

<style></style>
